AT-NFC  2.1 (win)
AT-NFC kernel set
Data Structures | Typedefs | Functions
Export Functions

Kernel export functions. More...

Data Structures

struct  tag_KER_OFFLINE_PIN_DATA
 offline PIN cvm related data structure More...
 

Typedefs

typedef struct tag_KER_OFFLINE_PIN_DATA KER_OFFLINE_PIN_DATA
 offline PIN cvm related data structure More...
 

Functions

KER_RES KER_API kerInit (KER_CTX_INIT_PARAM const KER_VOID *pConfigID, KER_INT16U usConfigIDLen, const KER_CHAR *pchKernelFiles, KER_INT16U usKernelFilesLen)
 Performs kernel initialization. More...
 
KER_RES KER_API kerDeInit (KER_CTX_SINGLE_PARAM)
 Performs kernel de-initialization. More...
 
KER_BOOL KER_API kerVerInfo (KER_CTX_PARAM KER_CHAR **ppchEmvVer, KER_INT16U *pusEmvVerLen, KER_CHAR **ppchLibVer, KER_INT16U *pusLibVerLen)
 Obtains emv kernel library version info. More...
 
KER_BOOL KER_API kerCheckATR (KER_CTX_PARAM const KER_BYTE *pbtATR, KER_BYTE btATRLen, KER_BYTE *pbtChipProto)
 Check ATR for chip protocol to use. More...
 
KER_RES KER_API kerBuildCL (KER_CTX_PARAM KER_BYTE btChipProtocol, KER_BOOL bUsePSE, KER_TLV **ppCandidateList, KER_TLV **ppBlockedAppList)
 Creates CL by all available methods (PSE & APP list) More...
 
KER_RES KER_API kerSelectApp (KER_CTX_PARAM KER_BYTE btChipProtocol, const KER_TLV *pCandidateToSelect, KER_TRAN **ppTran)
 Makes final app selection. More...
 
KER_RES KER_API kerSetTranData (KER_CTX_PARAM KER_TRAN *pTran, const KER_BYTE *pbtTranData, KER_INT16U usTranDataLen)
 Pass transaction data to the kernel. More...
 
KER_RES KER_API kerInitAppProc (KER_CTX_PARAM KER_TRAN *pTran)
 Initiate Application Processing. More...
 
KER_RES KER_API kerForceOnline (KER_CTX_PARAM KER_TRAN *pTran)
 Force transaction online by attendant. More...
 
KER_RES KER_API kerUpdateTVR (KER_CTX_PARAM KER_TRAN *pTran, const KER_BYTE *pbtData, KER_INT16U usDataLen)
 Updates TVR from external (some custom cvm may require this) More...
 
KER_RES KER_API kerReadAppData (KER_CTX_PARAM KER_TRAN *pTran)
 Reads application data from ICC. More...
 
KER_RES KER_API kerCardInExceptFile (KER_CTX_PARAM KER_TRAN *pTran)
 Let kernel know, that card appears in terminal exception file. More...
 
KER_RES KER_API kerCheckExceptFile (KER_CTX_PARAM KER_TRAN *pTran)
 Check if card appears in terminal exception file by HAL API. More...
 
KER_RES KER_API kerIsCashbackAllowed (KER_CTX_PARAM KER_TRAN *pTran)
 Check if card supports Cashback. More...
 
KER_RES KER_API kerOfflineAuth (KER_CTX_PARAM KER_TRAN *pTran)
 Performs offline authentification. More...
 
KER_RES KER_API kerProcRestrict (KER_CTX_PARAM KER_TRAN *pTran)
 Performs processing restrictions. More...
 
KER_RES KER_API kerCV (KER_CTX_PARAM KER_TRAN *pTran, KER_BYTE *pbtSelectedCVM, KER_BYTE *pbtCustomCVMCode)
 Performs cardholder verification. More...
 
KER_RES KER_API kerSetOnlinePinResult (KER_CTX_PARAM KER_TRAN *pTran, KER_BYTE btResult)
 Pass online pin entry result to kernel. More...
 
KER_RES KER_API kerGetOfflinePinData (KER_CTX_PARAM KER_TRAN *pTran, KER_OFFLINE_PIN_DATA *pOfflinePinData)
 Get special data for offline pin entry. More...
 
KER_RES KER_API kerSetOfflinePinResult (KER_CTX_PARAM KER_TRAN *pTran, KER_BYTE btResult, const KER_BYTE *pbtPinVerifyData, KER_INT16U usPinVerifyDataLen)
 Pass offline pin entry result to kernel. More...
 
KER_RES KER_API kerSetCustomCVMResult (KER_CTX_PARAM KER_TRAN *pTran, KER_BYTE btResult, const KER_BYTE *pbtTvrBitsToSet, KER_BYTE btTvrBitsToSetLen)
 Pass custom CVM result to kernel. More...
 
KER_RES KER_API kerRiskManagement (KER_CTX_PARAM KER_TRAN *pTran)
 Performs Terminal Risk Management. More...
 
KER_RES KER_API kerTAA (KER_CTX_PARAM KER_TRAN *pTran, KER_INT16U usMode)
 Performs Terminal Action Analysis. More...
 
KER_RES KER_API kerCAA (KER_CTX_PARAM KER_TRAN *pTran)
 Performs Card Action Analysis. More...
 
KER_RES KER_API kerOnline (KER_CTX_PARAM KER_TRAN *pTran, KER_BOOL bUnableToGoOnline, KER_INT16U usReferralResult)
 Process prev set by kerSetTranData() online authorization data by the kernel and makes second GAC. More...
 

Detailed Description

Kernel export functions.

This functions should be called by terminal application

Typedef Documentation

◆ KER_OFFLINE_PIN_DATA

offline PIN cvm related data structure

Termial application should use it:

  • to obtain PIN-related data from kernel
  • to provide kernel with PIN data to verify

Function Documentation

◆ kerBuildCL()

KER_RES KER_API kerBuildCL ( KER_CTX_PARAM KER_BYTE  btChipProtocol,
KER_BOOL  bUsePSE,
KER_TLV **  ppCandidateList,
KER_TLV **  ppBlockedAppList 
)

Creates CL by all available methods (PSE & APP list)

Builds candidate list by PSE and by step by step aid from supported aids list selection (if required). Also generates a list of blocked applications, to allow scheme-specific processing to be applied.

See EMV Book 1: 12.3.2 & 12.3.3 for details.

Parameters
[in]btChipProtocol- Chip protocol type KER_EMVL1_PROTOCOL_T0 or KER_EMVL1_PROTOCOL_T1
[in]bUsePSE- Define preffered build cl method (KER_TRUE - start from select PSE; KER_FALSE - skip PSE and continue with application list)
[out]ppCandidateList- pointer to obtain allocated candidate list (as a list of 9F06 and related tags) One candidate per container.
[out]ppBlockedAppList- pointer to obtain blocked app list (as a list of 9F06) (set KER_NUUL if you don't need it)
Returns
KER_OK Success.
KER_ERR_BUILD_CL_CARD_BLOCKED Card is blocked.
KER_ERR_COMMON_CARD_HW_ERR Card communication failure - abort transaction.
Other errors (Kernel Error Codes) Failure - abort transaction.

Candidate container cotains tag 84 as candidate AID (ASI requested for each candidate internally from config)

Warning
When candidate list (ppCandidateList) no longer required call kerContTlvListRelease. Do it despite of result code retuned.
When app blocked list (ppBlockedAppList) no longer required call kerContTlvListRelease. Do it despite of result code retuned.

◆ kerCAA()

KER_RES KER_API kerCAA ( KER_CTX_PARAM KER_TRAN pTran)

Performs Card Action Analysis.

See EMV Book 3, 10.8 for details.

Check for advice reqest and reason by kerTranGetFlags

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
Returns
KER_RES_APPROVED_OFFLINE Approved offline.
KER_RES_ONLINE_REQUESTED Online requested.
KER_RES_DECLINED_OFFLINE Declined offline.
KER_RES_SERVICE_NOT_ALLOWED_OFFLINE Declined with service not allowed reason. (Show "NOT ACCEPTED" - see EMV Book 4, 6.3.7)
Other errors (Kernel Error Codes) Failure - abort transaction.

◆ kerCardInExceptFile()

KER_RES KER_API kerCardInExceptFile ( KER_CTX_PARAM KER_TRAN pTran)

Let kernel know, that card appears in terminal exception file.

See EMV Book 4, 6.3.5 for details.

This function could be called after kerReadAppData and before kerTAA (final before GAC1)

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
Returns
KER_OK Success.
Other errors (Kernel Error Codes) Failure - abort transaction.

◆ kerCheckATR()

KER_BOOL KER_API kerCheckATR ( KER_CTX_PARAM const KER_BYTE pbtATR,
KER_BYTE  btATRLen,
KER_BYTE pbtChipProto 
)

Check ATR for chip protocol to use.

Parameters
[in]pbtATRBuffer with ATR, obtained by hal_emvl1_reset_card
[in]btATRLenlength of pbtATR
[out]pbtChipProtoparam to store chip protocol to use (KER_EMVL1_PROTOCOL_T0 or KER_EMVL1_PROTOCOL_T1)
Returns
KER_TRUE Success.
KER_FALSE Failure. Execution failed due to invalid param or apdu format.

◆ kerCheckExceptFile()

KER_RES KER_API kerCheckExceptFile ( KER_CTX_PARAM KER_TRAN pTran)

Check if card appears in terminal exception file by HAL API.

See EMV Book 4, 6.3.5 for details.

This function could be called after kerReadAppData and before kerTAA (final before GAC1)

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
Returns
KER_OK Success.
Other errors (Kernel Error Codes) Failure - abort transaction.

◆ kerCV()

KER_RES KER_API kerCV ( KER_CTX_PARAM KER_TRAN pTran,
KER_BYTE pbtSelectedCVM,
KER_BYTE pbtCustomCVMCode 
)

Performs cardholder verification.

See EMV Book 3, 10.5 for details.

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
[out]pbtSelectedCVM- buffer (1 byte) to obtain selected CVM. Can be set to: KER_CVM_SKIP - cardholder verification not supported by card - proceed to next transaction stage KER_CVM_FAIL - cardholder verification failed - proceed to next transaction stage KER_CVM_NO_CVM - cardholder verification not required - proceed to next transaction stage KER_CVM_ONLINE_PIN - online pin requested - call kerSetOnlinePinResult to pass pin entry result KER_CVM_PLAIN_PIN - plaintext offline pin requested - call kerGetOfflinePinData and kerGetOfflinePinData to pass pin entry result KER_CVM_ENC_PIN - enciphered offline pin requested - call kerGetOfflinePinData and kerGetOfflinePinData to pass pin entry result KER_CVM_PLAIN_PIN_SIG - plaintext offline pin & signature requested - call kerGetOfflinePinData and kerGetOfflinePinData to pass pin entry result KER_CVM_ENC_PIN_SIG - enciphered offline pin & signature requested - call kerGetOfflinePinData and kerGetOfflinePinData to pass pin entry result KER_CVM_SIGNATURE - signature requested - proceed to next transaction stage KER_CVM_CUSTOM - custom cvm requested - call kerSetCustomCVMResult to pass custom cvm result
[out]pbtCustomCVMCode- buffer (1 byte) to obtain selected CVM code as described in EMV Book 3 Annex C CV Rule Byte 1 including "Apply succeeding CV Rule if this CVM is unsuccessful" bit. Should be used for custom cvm processing. (optional, set KER_NULL if you don't need it)
Returns
KER_OK Success, check pbtCVM for selected method.
Other errors (Kernel Error Codes) Failure - abort transaction.

◆ kerDeInit()

KER_RES KER_API kerDeInit ( KER_CTX_SINGLE_PARAM  )

Performs kernel de-initialization.

Returns
KER_OK Success.
Other - failure.

Terminal Application should de-init kernel by this function

Warning
Do not call this function if kerInit failed.

◆ kerForceOnline()

KER_RES KER_API kerForceOnline ( KER_CTX_PARAM KER_TRAN pTran)

Force transaction online by attendant.

This function could be called after kerInitAppProc and before kerTAA (final before GAC1)

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
Returns
KER_OK Success.
Other errors (Kernel Error Codes) Failure - abort transaction.

◆ kerGetOfflinePinData()

KER_RES KER_API kerGetOfflinePinData ( KER_CTX_PARAM KER_TRAN pTran,
KER_OFFLINE_PIN_DATA pOfflinePinData 
)

Get special data for offline pin entry.

See EMV Book 3, 10.5 for details.

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
[out]pOfflinePinDataPointer to the buffer to obtain PIN verify data: plaintext PIN on enciphered pin (with usSize field set)
Returns
KER_OK Success, perform pin entry and call kerSetOfflinePinResult with pin entry results.
KER_INF_SELECT_CVM Call kerCV to select another CVM.
KER_INF_PIN_BLOCKED PIN blocked - call kerCV to select another CVM.
Other errors (Kernel Error Codes) Failure - abort transaction.

◆ kerInit()

KER_RES KER_API kerInit ( KER_CTX_INIT_PARAM const KER_VOID pConfigID,
KER_INT16U  usConfigIDLen,
const KER_CHAR pchKernelFiles,
KER_INT16U  usKernelFilesLen 
)

Performs kernel initialization.

Parameters
[in]pConfigIDBuffer with configuration ID obtained from Terminal Application (in HAL recognized format)
[in]usConfigIDLenpConfigID buffer length
[in]pchKernelFilesbuffer with kernel binary file names (for checksum calculation) - set of nul terminated strings ended by nul.
[in]usKernelFilesLenlength of pchKernelFiles including nul-terminating sym
Returns
KER_OK Success.
Other - failure.

Terminal Application should init kernel by this function before calling any other kernel functions

Warning
If kerInit returns KER_OK, Terminal Application should call kerDeInit finally to release allocated resources.

◆ kerInitAppProc()

KER_RES KER_API kerInitAppProc ( KER_CTX_PARAM KER_TRAN pTran)

Initiate Application Processing.

Initiate Application Processing by get processing options command

This function should be called after kerSelectApp

See EMV Book 3: 10.1 for details.

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
Returns
KER_OK Success.
KER_ERR_INIT_APP_PROC_INV_PDOL Invalid PDOL data - remove app from cl and try again.
KER_ERR_INIT_APP_PROC_INV_CONDITIONS Conditions not satisfied - remove app from cl and try again.
KER_ERR_COMMON_CARD_HW_ERR Card communication failure - abort transaction
Other errors (Kernel Error Codes) Failure - abort transaction.

Place tran data that already known to Terminal Application. PAN (which is not available at this moment) related data should be passed to kernel later.

◆ kerIsCashbackAllowed()

KER_RES KER_API kerIsCashbackAllowed ( KER_CTX_PARAM KER_TRAN pTran)

Check if card supports Cashback.

See EMV Book 4, 6.3.3 for details.

This function could be called after kerReadAppData

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
Returns
KER_OK Success, cashback allowed.
KER_ERR_IS_CASHBACK_ALLOWED_NOT_ALLOWED Success, cashback not allowed.
Other errors (Kernel Error Codes) Failure - abort transaction.

◆ kerOfflineAuth()

KER_RES KER_API kerOfflineAuth ( KER_CTX_PARAM KER_TRAN pTran)

Performs offline authentification.

See EMV Book 2; EMV Book 3, 10.3 for details.

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
Returns
KER_OK Success.
Other errors (Kernel Error Codes) Failure - abort transaction.

◆ kerOnline()

KER_RES KER_API kerOnline ( KER_CTX_PARAM KER_TRAN pTran,
KER_BOOL  bUnableToGoOnline,
KER_INT16U  usReferralResult 
)

Process prev set by kerSetTranData() online authorization data by the kernel and makes second GAC.

Check for advice reqest and reason by kerTranGetFlags

See EMV Book 3, 10.9-10 for details.

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
[in]bUnableToGoOnline- Indicates online availability
[in]usReferralResult- Indicates voice referral result from attendant: KER_REFFERAL_RES_NA - n/a (referral not supported) KER_REFFERAL_RES_APPROVE - approve requested KER_REFFERAL_RES_DECLINE - decline requested
Returns
KER_RES_APPROVED_ONLINE Approved offline.
KER_RES_DECLINED_ONLINE Declined offline.
KER_RES_SERVICE_NOT_ALLOWED_ONLINE Declined with service not allowed reason. (Show "NOT ACCEPTED" - see EMV Book 4, 6.3.7)
KER_RES_DECLINED_BY_HOST Declined by host (based on ARC provided)
KER_RES_APPROVED_DEFAULT Approved by default.
KER_RES_DECLINED_DEFAULT Declined by default.
KER_RES_SERVICE_NOT_ALLOWED_DEFAULT Declined by default with service not allowed reason. (Show "NOT ACCEPTED" - see EMV Book 4, 6.3.7)
Other errors (Kernel Error Codes) Failure - abort transaction.

◆ kerProcRestrict()

KER_RES KER_API kerProcRestrict ( KER_CTX_PARAM KER_TRAN pTran)

Performs processing restrictions.

See EMV Book 3, 10.4 for details.

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
Returns
KER_OK Success.
Other errors (Kernel Error Codes) Failure - abort transaction.

◆ kerReadAppData()

KER_RES KER_API kerReadAppData ( KER_CTX_PARAM KER_TRAN pTran)

Reads application data from ICC.

Reads application data from ICC by set of read record command and validates data obtained

This function should be called after kerInitAppProc

See EMV Book 3: 10.2 for details.

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
Returns
KER_OK Success.
Other errors (Kernel Error Codes) Failure - abort transaction.

◆ kerRiskManagement()

KER_RES KER_API kerRiskManagement ( KER_CTX_PARAM KER_TRAN pTran)

Performs Terminal Risk Management.

See EMV Book 3, 10.6 for details.

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
Returns
KER_OK Success.
Other errors (Kernel Error Codes) Failure - abort transaction.

◆ kerSelectApp()

KER_RES KER_API kerSelectApp ( KER_CTX_PARAM KER_BYTE  btChipProtocol,
const KER_TLV pCandidateToSelect,
KER_TRAN **  ppTran 
)

Makes final app selection.

Select app from previouse build candidate list and allocate transaction structure

This function starts EMV transaction

See EMV Book 1: 12.4 for details.

Parameters
[in]btChipProtocol- Chip protocol type KER_EMVL1_PROTOCOL_T0 or KER_EMVL1_PROTOCOL_T1
[in]pCandidateToSelect- pointer selected candidate container
[out]ppTran- pointer to obtain allocated transaction structure
Returns
KER_OK Success.
KER_ERR_COMMON_CARD_HW_ERR Card communication failure - abort transaction
KER_ERR_SELECT_APP_UNSUPP_COMMAND Unsupported command or card blocked - remove it from cl and select app again
KER_ERR_SELECT_APP_APP_BLOCKED App blocked - remove it from cl and select app again
KER_ERR_SELECT_APP_SELECT_SW App select failure - remove it from cl and select app again
KER_ERR_SELECT_APP_FCI_DATA App-related fci data invalid format - remove it from cl and select app again
KER_ERR_SELECT_APP_DF_MISMATCH Requested and selected DF mismatch - remove it from cl and select app again
Other errors (Kernel Error Codes) Failure - abort transaction.
Warning
When tranaction struct (ppTran) no longer required call kerTranRelease. Do it despite of result code retuned.

◆ kerSetCustomCVMResult()

KER_RES KER_API kerSetCustomCVMResult ( KER_CTX_PARAM KER_TRAN pTran,
KER_BYTE  btResult,
const KER_BYTE pbtTvrBitsToSet,
KER_BYTE  btTvrBitsToSetLen 
)

Pass custom CVM result to kernel.

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
[in]btResult- Custom CVM result: KER_CVM_RES_OK - verification success KER_CVM_RES_FAIL - failure (hw error) KER_CVM_RES_UNKNOWN - result defined on issuer side (like online pin) KER_CVM_RES_BYPASS - bypass this CVM by cardholder KER_CVM_RES_UNSUPP - this custom CVM unsupported
[in]pbtTvrBitsToSet- buffer with bits to | with current TVR (optional, set KER_NULL if you don't need it)
[in]btTvrBitsToSetLen- length of pbtTvrBitsToSet (5 bytes assumed, 0 if pbtTvrBitsToSet = KER_NULL)
Returns
KER_OK Success, proceed to next transaction stage.
KER_INF_SELECT_CVM Call kerCV to select another CVM.
KER_INF_CANCEL_BY_USER Transaction cancelled by user.
Other errors (Kernel Error Codes) Failure - abort transaction.

◆ kerSetOfflinePinResult()

KER_RES KER_API kerSetOfflinePinResult ( KER_CTX_PARAM KER_TRAN pTran,
KER_BYTE  btResult,
const KER_BYTE pbtPinVerifyData,
KER_INT16U  usPinVerifyDataLen 
)

Pass offline pin entry result to kernel.

See EMV Book 3, 10.5 for details.

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
[in]btResult- Result on online pin entry: KER_CVM_RES_UNKNOWN - offline pin entered (result defined on card side) KER_CVM_RES_FAIL - failure (hw error) KER_CVM_RES_BYPASS - bypass pin entry selected KER_CVM_RES_CANCEL - pin entry cancelled by cardholder
[in]pbtPinVerifyDataPIN verify data: plaintext PIN on enciphered pin
[in]usPinVerifyDataLenpbtPinVerifyData buffer length
Returns
KER_OK Success, proceed to next transaction stage.
KER_INF_SELECT_CVM Call kerCV to select another CVM.
KER_INF_CANCEL_BY_USER Transaction cancelled by user.
KER_INF_PIN_BLOCKED PIN blocked - call kerCV to select another CVM.
KER_INF_INVALID_PIN Invalid PIN - call kerGetOfflinePinData to try again.
Other errors (Kernel Error Codes) Failure - abort transaction.

◆ kerSetOnlinePinResult()

KER_RES KER_API kerSetOnlinePinResult ( KER_CTX_PARAM KER_TRAN pTran,
KER_BYTE  btResult 
)

Pass online pin entry result to kernel.

See EMV Book 3, 10.5 for details.

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
[in]btResult- Result on online pin entry: KER_CVM_RES_UNKNOWN - online pin entered (result defined on issuer side) KER_CVM_RES_FAIL - failure (hw error) KER_CVM_RES_BYPASS - bypass pin entry selected KER_CVM_RES_CANCEL - pin entry cancelled by cardholder
Returns
KER_OK Success, proceed to next transaction stage.
KER_INF_SELECT_CVM Call kerCV to select another CVM.
KER_INF_CANCEL_BY_USER Transaction cancelled by user.
Other errors (Kernel Error Codes) Failure - abort transaction.

◆ kerSetTranData()

KER_RES KER_API kerSetTranData ( KER_CTX_PARAM KER_TRAN pTran,
const KER_BYTE pbtTranData,
KER_INT16U  usTranDataLen 
)

Pass transaction data to the kernel.

To provide PAN independed transaction data this function could be called after kerSelectApp to let them be used during PDOL processing.

To provide PAN depended transaction data this function could be called just after kerReadAppData

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
[in]pbtTranData- pointer to transaction data (amount, currency, transaction type, etc... ) as tlv buffer (optional, set KER_NULL if you don't need it)
[in]usTranDataLen- pbtTranData buffer length
Returns
KER_OK Success.
Other errors (Kernel Error Codes) Failure - abort transaction.

◆ kerTAA()

KER_RES KER_API kerTAA ( KER_CTX_PARAM KER_TRAN pTran,
KER_INT16U  usMode 
)

Performs Terminal Action Analysis.

See EMV Book 3, 10.7 for details.

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
[in]usMode- set KER_TAA_MODE_CHECK_OFFLINE_DECL , KER_TAA_MODE_FINAL_BEFORE_CAA or KER_TAA_MODE_UNABLE_TO_GO_ONLINE
Returns
KER_OK Success.
Other errors (Kernel Error Codes) Failure - abort transaction.

◆ kerUpdateTVR()

KER_RES KER_API kerUpdateTVR ( KER_CTX_PARAM KER_TRAN pTran,
const KER_BYTE pbtData,
KER_INT16U  usDataLen 
)

Updates TVR from external (some custom cvm may require this)

To update TVR from external. This function could be called after kerInitAppProc and before kerTAA (final before GAC1)

Parameters
[in]pTran- pointer to transaction structure obtained by kerSelectApp
[in]pbtData- pointer to data buffer (5 bytes assumed) to OR with current TVR
[in]usDataLen- pbtData buffer length
Returns
KER_OK Success.
Other errors (Kernel Error Codes) Failure - abort transaction.

◆ kerVerInfo()

KER_BOOL KER_API kerVerInfo ( KER_CTX_PARAM KER_CHAR **  ppchEmvVer,
KER_INT16U pusEmvVerLen,
KER_CHAR **  ppchLibVer,
KER_INT16U pusLibVerLen 
)

Obtains emv kernel library version info.

Parameters
[out]ppchEmvVerpointer to obtain reference to EMV version info (optional, set KER_NULL if you don't need it)
[out]pusEmvVerLenlength of data, including nul-terminated symbol (optional, set KER_NULL if you don't need it)
[out]ppchLibVerpointer to obtain reference to kernel library version info (optional, set KER_NULL if you don't need it)
[out]pusLibVerLenlength of data, including nul-terminated symbol (optional, set KER_NULL if you don't need it)
Returns
KER_TRUE Success.
KER_FALSE Failure. Execution failed due to invalid param.